<template>
  <div>
    <el-dialog title="门店列表" :visible="visible" fullscreen @close="onClose">
      <el-table
        :data="cellularStores"
        v-loading="loading"
        tooltip-effect="dark"
        :border="true"
        style="width: 100%"
        ref="storeTable"
        :row-style="tableRowStyle"
      >
        <el-table-column align="center" min-width="120px" prop="storeCode" label="门店编号">
          <template slot-scope="scope">
            {{ scope.row.sortStore === 1 ? scope.row.storeCode : '' }}
          </template>
        </el-table-column>
        <el-table-column align="center" min-width="150px" prop="storeName" label="门店名称"></el-table-column>
        <el-table-column align="center" min-width="150px" prop="storeLevel" label="门店类型"></el-table-column>
        <el-table-column align="center" min-width="100px" prop="monthSalesData" label="月销数据"></el-table-column>
        <el-table-column align="center" min-width="100px" prop="minPrice" label="起送价"></el-table-column>
        <el-table-column align="center" min-width="250px" prop="fullReductionActivity" label="满减活动"></el-table-column>
        <el-table-column align="center" prop="monthSalesModifyTime" min-width="160px" label="月售更新日期" :formatter="formatTime"> </el-table-column>
        <el-table-column align="center" prop="sortStore" label="门店属性">
          <template slot-scope="scope">{{ scope.row.sortStore === 1 ? '益丰门店' : '竞对门店' }} </template>
        </el-table-column>
        <el-table-column align="center" prop="modifyAndModifyTime" min-width="120px" label="维护对象/时间"></el-table-column>
        <el-table-column align="center" label="操作">
          <template slot-scope="scope">
            <el-button type="text" @click="onDeleteStore(scope.row)" :loading="deleting">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-dialog>
  </div>
</template>

<style lang="scss" module>
@import './index.module.scss';
</style>

<script>
import Index from './index';
export default Index;
</script>
